<body>
<h1>Driver for running Scriptella ETL files.</h1>
The idea of this driver is similar to Ant's &lt;ant&gt; task, i.e. it is suitable for
splitting ETL files into sub-projects.
<p>When ETL file is executed from another Scriptella ETL file variables context is
propagated to the callee.</p>
<h2>General information</h2>
<table>
    <tr>
        <td><b>Driver class:</b></td><td><code>scriptella.driver.scriptella.Driver</code></td>
    </tr>
    <tr>
        <td><b>URL:</b></td><td>URL of the ETL file to execute. URIs are resolved relative to a script file.
    Not required.</td>
    </tr>
    <tr>
        <td><b>Runtime dependencies:</b></td><td>None</td>
    </tr>
</table>
<h2>Driver Specific Properties</h2>
<table border="1">
    <tr>
        <th>Name</th>
        <th>Description</th>
        <th>Required</th>
    </tr>
</table>

<h2>Script Syntax</h2>
Put ETL file names or absolute URLs directly in the body of <code>&lt;script&gt;</code> element.
File paths are separated by End-Of-Line tokens.
<p>Use standard ${name} or $name syntax for properties substitution.</p>
<p><code>&lt;query&gt;</code> elements are not supported.</p>

<a name="examples"/>
<h2>Examples</h2>
The following example creates a database by executing external ETL file named
create_db.etl.xml and then executes an SQL script over it:
<code><pre>
&lt;etl>
    &lt;connection id="createdb" driver="scriptella" url="createdb.etl.xml"/>
    &lt;connection id="db" driver="oracle" url="jdbc:...."/>

    &lt;script connection-id="db">
        INSERT INTO ...
    &lt;/script>
&lt;/etl>
</pre></code>
<p>
The following example selects user_id, email from Users table and
    runs genreport.etl.xml and sendreport.etl.xml for each record found:
<code><pre>
&lt;etl>
    &lt;connection id="db" driver="oracle" url="jdbc:...." />
    &lt;connection id="scriptella" driver="scriptella" />

    &lt;query connection-id="db">
        &lt;!-- Selects User_ID and EMail, this variables are visible in nested scripts -->
        SELECT User_ID, Email FROM Users
        &lt;script connection-id="scriptella">
            genreport.etl.xml &lt;!-- Generates report for User_ID -->
            sendreport.etl.xml &lt;!-- Sends produced report to Email -->
        &lt;/script>
    &lt;/query>
&lt;/etl>
</pre></code>

</body>